<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>
        创建比赛
    </title>
    <link href="/bm/Public/css/Mi.css" type="text/css" rel="stylesheet" media="screen,projection"/>
    <link href="/bm/Public/css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection">
    <link href="/bm/Public/css/style.min.css" type="text/css" rel="stylesheet" media="screen,projection">
    


</head>

<body>

<header id="header" class="page-topbar">
    <!-- 头部-->
    <div class="navbar-fixed ">
        <nav class="navbar-color blue">
            <div class="nav-wrapper">
                <ul>
                    <img class="z-depth-1 hide-on-med-and-down circle responsive-img left"
                         src="/bm/Public/images/logo3.jpg" width="50px"
                         style="margin:5px;margin-left:25px;border-radius:50%">
                    <h1 class="logo-wrapper">

                        <a href="index.html"
                           class="brand-logo">后台管理系统</a>
                    </h1>

                </ul>

                <ul class="right hide-on-med-and-down">
                    <li>
                        <a href="<?php echo U('Admin/Login/logout');?>" data-activates="chat-out"
                           class="waves-effect waves-block waves-light chat-collapse">
                            <i class="mdi-action-exit-to-app"></i>
                        </a>
                    </li>
                </ul>

            </div>
        </nav>
    </div>
</header>


<div id="main">
    <div class="wrapper">
        <aside id="left-sidebar-nav">
            <ul id="slide-out" class="side-nav fixed leftside-navigation">
                <li class="user-details blue darken-2">
                    <div class="row">
                        <div class="col s12 m12 l12">
                            <ul id="profile-dropdown" class="dropdown-content">
                                <li>
                                    <a href="#"><i class="mdi-action-lock-outline"></i>修改密码</a>
                                </li>
                                <li>
                                    <a href="<?php echo U('Admin/Login/logout');?>"><i
                                            class="mdi-hardware-keyboard-tab"></i>退出系统</a>
                                </li>
                            </ul>
                            <a style="font-size: 24px"
                               class="btn-flat dropdown-button waves-effect waves-light white-text profile-btn" href="#"
                               data-activates="profile-dropdown"><?php echo session("Name");?><i
                                    class="mdi-navigation-arrow-drop-down right"></i>
                            </a>
                            <?php switch($_SESSION['Rank']): case "0": ?><p class="user-roal">管理员</p><?php break;?>
                                <?php case "1": ?><p class="user-roal">高权教师</p><?php break;?>
                                <?php case "2": ?><p class="user-roal">教师</p><?php break;?>
                                <?php default: ?>
                                default<?php endswitch;?>
                        </div>
                    </div>
                </li>
                
                    <li class="bold ">
                        <a href="<?php echo U('Admin/Index/index');?>" class="waves-effect waves-cyan">
                            <i
                                    class="mdi-action-home"></i>首页
                        </a>
                    </li>
                    <li class="no-padding">
                        <ul class="collapsible collapsible-accordion">
                            <li class="bold">
                                <a class="collapsible-header waves-effect waves-cyan active">
                                    <i class="mdi-action-view-quilt"></i>比赛管理
                                </a>
                                <div class="collapsible-body">
                                    <ul>

                                        <?php if(($_SESSION['Rank']) == "0"): ?><li class=""><a
                                                    href="<?php echo U('Admin/MatchMag/allMatch');?>">所有比赛</a>
                                            </li>
                                            <?php else: ?>
                                            <li class=""><a
                                                    href="<?php echo U('Admin/MatchMag/deptMatch');?>">本系比赛</a>
                                            </li><?php endif; ?>
                                        <li class=""><a
                                                href="<?php echo U('Admin/MatchMag/issueMatch');?>">我发布的比赛</a>
                                        </li>
                                        <li class=""><a
                                                href="<?php echo U('Admin/MatchMag/unissueMatch');?>">未发布的比赛</a>
                                        </li>
                                        <li class="active"><a
                                                href="<?php echo U('Admin/MatchMag/addMatch');?>">创建比赛</a>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <?php if(($_SESSION['Rank']== 0) OR ($_SESSION['Rank']== 1) ): ?><li class="no-padding">
                            <ul class="collapsible collapsible-accordion">
                                <li class="bold"><a
                                        class="collapsible-header waves-effect waves-cyan "><i
                                        class="mdi-action-view-carousel"></i>学院管理</a>
                                    <div class="collapsible-body">
                                        <ul>
                                            <?php if(($_SESSION['Rank']) == "0"): ?><li class=""><a
                                                        href="<?php echo U('Admin/SchoolMag/classMag',array('deptid'=>0));?>">班级管理</a>
                                                </li>
                                                <li class=""><a
                                                        href="<?php echo U('Admin/SchoolMag/deptMag');?>">系部管理</a>
                                                </li>
                                                <?php else: ?>
                                                <li class=""><a
                                                        href="<?php echo U('Admin/SchoolMag/classMag',array('deptid'=>$_SESSION['DeptId']));?>">班级管理</a>
                                                </li><?php endif; ?>

                                        </ul>
                                    </div>
                                </li>
                            </ul>
                        </li><?php endif; ?>

                    <li class="no-padding">
                        <ul class="collapsible collapsible-accordion">
                            <li class="bold"><a
                                    class="collapsible-header waves-effect waves-cyan "><i
                                    class="mdi-action-account-box"></i>系统用户管理</a>
                                <div class="collapsible-body">
                                    <ul>

                                        <?php if(($_SESSION['Rank']== 0) OR ($_SESSION['Rank']== 1) ): if(($_SESSION['Rank']) == "0"): ?><li class=""><a
                                                        href="<?php echo U('Admin/UserMag/adminMag');?>">管理员管理</a>
                                                </li>
                                                <li class=""><a
                                                        href="<?php echo U('Admin/UserMag/tecMag',array('deptid'=>0));?>">教师管理</a>
                                                </li>
                                                <li class=""><a
                                                        href="<?php echo U('Admin/UserMag/stuMag',array('deptid'=>0));?>">学生管理</a>
                                                </li>
                                                <?php else: ?>
                                                <li class=""><a
                                                        href="<?php echo U('Admin/UserMag/tecMag',array('deptid'=>$_SESSION['DeptId']));?>">教师管理</a>
                                                </li>
                                                <li class=""><a
                                                        href="<?php echo U('Admin/UserMag/stuMag',array('deptid'=>$_SESSION['DeptId']));?>">学生管理</a>
                                                </li><?php endif; ?>
                                            <?php else: ?>
                                            <li class=""><a
                                                    href="<?php echo U('Admin/UserMag/stuMag',array('deptid'=>$_SESSION['DeptId']));?>">学生管理</a>
                                            </li><?php endif; ?>
                                        <!--<li class=""><a-->
                                        <!--href="<?php echo U('Admin/AddUser/index');?>">新增用户</a>-->
                                        <!--</li>-->
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </li>


                    <li class="bold"><a href="<?php echo U('Home/Index/index');?>" class="waves-effect waves-cyan"><i
                            class="mdi-action-label-outline"></i>返回前台</a>
                    </li>
                    <li class="bold"><a href="<?php echo U('Admin/Login/logout');?>" class="waves-effect waves-cyan"><i
                            class="mdi-action-exit-to-app"></i>退出系统</a>
                    </li>
                
            </ul>
            <a href="#" data-activates="slide-out"
               class="sidebar-collapse btn-floating btn-medium waves-effect waves-light hide-on-large-only blue"><i
                    class="mdi-navigation-menu"></i></a>

        </aside>

        <section id="content">


            <div id="breadcrumbs-wrapper">
                <div class="container">
                    <div class="row">
                        <div class="col s12 m12 l12">
                            
    <h5 class="breadcrumbs-title">创建比赛</h5>
    <ol class="breadcrumbs">
        <li class="active"><a href="<?php echo U('Admin/Index/index');?>">首页</a>
        </li>
        <li class="active">创建比赛
        </li>
    </ol>

                        </div>
                    </div>
                </div>
            </div>


            <div class="container">
                <div class="section">
                    <div class="row">
                        <div class="col s12 m12 l12">
                            <div class="card-panel">
                                <div class="row">
                                    
    <div class="col s10 m10 l10 offset-l1 offset-s1 offset-m1">
        <h3 class="center-align">创建比赛</h3>
        <form action="" method="post">
            <div class="row">
                <h5>比赛类别：</h5>
                <div class="col s6 l6 m6 center-align">
                    <input class="with-gap" name="enclass" value="0" checked type="radio" id="class0"/>
                    <label for="class0">团体</label>
                </div>
                <div class="col s6 l6 m6 center-align">
                    <input class="with-gap" name="enclass" value="1" type="radio" id="class1"/>
                    <label for="class1">个人</label>
                </div>
            </div>
            <br>
            <div class="row">
                <div class="input-field col s12">
                    <input id="title" name="title" type="text" class="validate" required>
                    <label for="title">比赛名称</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <select name="deptid" required>
                        <option value="" disabled selected>选择系部</option>
                        <?php $_result=getDept();if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["did"]); ?>"><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                    <label>负责系部</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <input id="pri" name="pri" type="text" class="validate">
                    <label for="pri">负责人</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <input id="num" name="num" type="text" class="validate">
                    <label for="num">最多报名人数</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <input id="start" name="start" type="date" class="datepicker">
                    <label for="start">报名开始时间</label>
                </div>
            </div>

            <div class="row">
                <div class="input-field col s12">
                    <input id="end" name="end" type="date" class="datepicker">
                    <label for="end">报名截止时间</label>
                </div>
            </div>

            <div class="row">
                <h5>内容：</h5>
                <div class="input-field col s12">
                    <script id="editor" name="content" type="text/plain" style="width:100%;height:500px;"></script>
                </div>
            </div>


            <div class="row">
                <div class="input-field col s12 l12 m12 center-align">
                    <input class="waves-effect waves-light btn blue" name="issue" type="submit" value="发布">
                    <input class="waves-effect waves-light btn green" name="unissue" type="submit" value="暂时不发布">
                    <input class="waves-effect waves-light btn red" type="reset" value="重置">
                </div>
            </div>
        </form>
    </div>


                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>


</div>


<footer class="page-footer">
    <div class="footer-copyright blue">
        <div class="container">
            <span>Copyright © 2016 <a class="grey-text text-lighten-4"
                                      href="http://gxsdxy.cn"
                                      target="_blank">广西水利电力职业技术学院</a></span>
            <span class="right"> 技术支持 <a class="grey-text text-lighten-4"
                                         href="#">敏捷软件协会</a></span>
        </div>
    </div>
</footer>

<!--<script type="text/javascript" src="/bm/Public/js/jquery.js"></script>-->
<!--<script type="text/javascript" src="/bm/Public/Admin/js/materialize.min.js"></script>-->
<script type="text/javascript" src="/bm/Public/js/jquery.js"></script>
<script src="/bm/Public/js/jquery-ui.js"></script>
<script src="/bm/Public/js/materialize.js"></script>
<script src="/bm/Public/js/init.js"></script>
<script>
    $(".sidebar-collapse").sideNav();
</script>

    <script type="text/javascript" charset="utf-8" src="/bm/Public/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/bm/Public/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/bm/Public/ueditor/lang/zh-cn/zh-cn.js"></script>


    <script>
        var ue = UE.getEditor('editor');

        $(document).ready(function () {
            $('select').material_select();
            $.extend($.fn.pickadate.defaults, {
                monthsFull: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                monthsShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                weekdaysFull: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
                weekdaysShort: ['日', '一', '二', '三', '四', '五', '六'],
                today: '今天',
                clear: '清除',
                close: '关闭',
                firstDay: 1,
                format: 'yyyy-mm-dd'
            })
            $('.datepicker').pickadate({
                selectMonths: true,
                selectYears: 15,
            });
        });
    </script>


</body>

</html>